const Koa = require('koa');
const router = require('koa-router')();
const DB = require('./module/db.js');

const app = new Koa();


router.get('/', async (ctx) => {

	let result = await DB.findOne('user', {});
	console.log(result);
	ctx.body = '首页';
});


app.use(router.routes());
app.use(router.allowedMethods());

app.listen(8088);
console.log('Server run http://localhost:8088/');
